import _ from 'lodash';
import { CSSProperties, FC } from 'react'
import { imgs } from '../assets/img'

interface IconProps {
    type: number;
    style?: CSSProperties
}
const defaultStyle: CSSProperties = {
    width: 40,
    height: 40,
}

const Icons: FC<IconProps> = ({ type = 1, style }) => {
    const css = _.merge(defaultStyle, style)
    return (
        <div style={css}>
            <img style={{ ...css, display: 'block' }} src={imgs[`png${type}`]} alt="" />
        </div>
    )
}

export default Icons